3.260 \(\int \frac{(e+f x)^2 \cosh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx\)

Optimal. Leaf size=82 \[ \frac{2 i f (e+f x) \sinh (c+d x)}{a d^2}-\frac{2 i f^2 \cosh (c+d x)}{a d^3}-\frac{i (e+f x)^2 \cosh (c+d x)}{a d}+\frac{(e+f x)^3}{3 a f} \]

[Out]

(e + f*x)^3/(3*a*f) - ((2*I)*f^2*Cosh[c + d*x])/(a*d^3) - (I*(e + f*x)^2*Cosh[c + d*x])/(a*d) + ((2*I)*f*(e +
f*x)*Sinh[c + d*x])/(a*d^2)

________________________________________________________________________________________

Rubi [A]  time = 0.126473, antiderivative size = 82, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.129, Rules used = {5563, 32, 3296, 2638} \[ \frac{2 i f (e+f x) \sinh (c+d x)}{a d^2}-\frac{2 i f^2 \cosh (c+d x)}{a d^3}-\frac{i (e+f x)^2 \cosh (c+d x)}{a d}+\frac{(e+f x)^3}{3 a f} \]

Antiderivative was successfully verified.

[In]

Int[((e + f*x)^2*Cosh[c + d*x]^2)/(a + I*a*Sinh[c + d*x]),x]

[Out]

(e + f*x)^3/(3*a*f) - ((2*I)*f^2*Cosh[c + d*x])/(a*d^3) - (I*(e + f*x)^2*Cosh[c + d*x])/(a*d) + ((2*I)*f*(e +
f*x)*Sinh[c + d*x])/(a*d^2)

Rule 5563

Int[(Cosh[(c_.) + (d_.)*(x_)]^(n_)*((e_.) + (f_.)*(x_))^(m_.))/((a_) + (b_.)*Sinh[(c_.) + (d_.)*(x_)]), x_Symb
ol] :> Dist[1/a, Int[(e + f*x)^m*Cosh[c + d*x]^(n - 2), x], x] + Dist[1/b, Int[(e + f*x)^m*Cosh[c + d*x]^(n -
2)*Sinh[c + d*x], x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 1] && EqQ[a^2 + b^2, 0]

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rule 3296

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> -Simp[((c + d*x)^m*Cos[e + f*x])/f, x] +
Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 2638

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int \frac{(e+f x)^2 \cosh ^2(c+d x)}{a+i a \sinh (c+d x)} \, dx &=-\frac{i \int (e+f x)^2 \sinh (c+d x) \, dx}{a}+\frac{\int (e+f x)^2 \, dx}{a}\\ &=\frac{(e+f x)^3}{3 a f}-\frac{i (e+f x)^2 \cosh (c+d x)}{a d}+\frac{(2 i f) \int (e+f x) \cosh (c+d x) \, dx}{a d}\\ &=\frac{(e+f x)^3}{3 a f}-\frac{i (e+f x)^2 \cosh (c+d x)}{a d}+\frac{2 i f (e+f x) \sinh (c+d x)}{a d^2}-\frac{\left (2 i f^2\right ) \int \sinh (c+d x) \, dx}{a d^2}\\ &=\frac{(e+f x)^3}{3 a f}-\frac{2 i f^2 \cosh (c+d x)}{a d^3}-\frac{i (e+f x)^2 \cosh (c+d x)}{a d}+\frac{2 i f (e+f x) \sinh (c+d x)}{a d^2}\\ \end{align*}

Mathematica [A]  time = 0.484384, size = 78, normalized size = 0.95 \[ \frac{-3 i \cosh (c+d x) \left (d^2 (e+f x)^2+2 f^2\right )+6 i d f (e+f x) \sinh (c+d x)+d^3 x \left (3 e^2+3 e f x+f^2 x^2\right )}{3 a d^3} \]

Antiderivative was successfully verified.

[In]

Integrate[((e + f*x)^2*Cosh[c + d*x]^2)/(a + I*a*Sinh[c + d*x]),x]

[Out]

(d^3*x*(3*e^2 + 3*e*f*x + f^2*x^2) - (3*I)*(2*f^2 + d^2*(e + f*x)^2)*Cosh[c + d*x] + (6*I)*d*f*(e + f*x)*Sinh[
c + d*x])/(3*a*d^3)

________________________________________________________________________________________

Maple [B]  time = 0.042, size = 223, normalized size = 2.7 \begin{align*} -{\frac{1}{{d}^{3}a} \left ( i{f}^{2} \left ( \left ( dx+c \right ) ^{2}\cosh \left ( dx+c \right ) -2\, \left ( dx+c \right ) \sinh \left ( dx+c \right ) +2\,\cosh \left ( dx+c \right ) \right ) -2\,ic{f}^{2} \left ( \left ( dx+c \right ) \cosh \left ( dx+c \right ) -\sinh \left ( dx+c \right ) \right ) +2\,ifed \left ( \left ( dx+c \right ) \cosh \left ( dx+c \right ) -\sinh \left ( dx+c \right ) \right ) +i{c}^{2}{f}^{2}\cosh \left ( dx+c \right ) -2\,icdfe\cosh \left ( dx+c \right ) +i{d}^{2}{e}^{2}\cosh \left ( dx+c \right ) -{\frac{{f}^{2} \left ( dx+c \right ) ^{3}}{3}}+c{f}^{2} \left ( dx+c \right ) ^{2}-efd \left ( dx+c \right ) ^{2}-{c}^{2}{f}^{2} \left ( dx+c \right ) +2\,cdfe \left ( dx+c \right ) -{d}^{2}{e}^{2} \left ( dx+c \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x+e)^2*cosh(d*x+c)^2/(a+I*a*sinh(d*x+c)),x)

[Out]

-1/d^3/a*(I*f^2*((d*x+c)^2*cosh(d*x+c)-2*(d*x+c)*sinh(d*x+c)+2*cosh(d*x+c))-2*I*c*f^2*((d*x+c)*cosh(d*x+c)-sin
h(d*x+c))+2*I*f*e*d*((d*x+c)*cosh(d*x+c)-sinh(d*x+c))+I*c^2*f^2*cosh(d*x+c)-2*I*c*d*f*e*cosh(d*x+c)+I*d^2*e^2*
cosh(d*x+c)-1/3*f^2*(d*x+c)^3+c*f^2*(d*x+c)^2-e*f*d*(d*x+c)^2-c^2*f^2*(d*x+c)+2*c*d*f*e*(d*x+c)-d^2*e^2*(d*x+c
))

________________________________________________________________________________________

Maxima [B]  time = 1.59838, size = 366, normalized size = 4.46 \begin{align*} \frac{1}{2} \, e f{\left (\frac{4 \, x e^{\left (d x + c\right )}}{a d e^{\left (d x + c\right )} - i \, a d} + \frac{-2 i \, d^{2} x^{2} e^{c} - 2 i \, d x e^{c} -{\left (2 i \, d x e^{\left (3 \, c\right )} - 2 i \, e^{\left (3 \, c\right )}\right )} e^{\left (2 \, d x\right )} + 2 \,{\left (d^{2} x^{2} e^{\left (2 \, c\right )} - 3 \, d x e^{\left (2 \, c\right )} + e^{\left (2 \, c\right )}\right )} e^{\left (d x\right )} - 2 \,{\left (d x + 1\right )} e^{\left (-d x\right )} - 2 i \, e^{c}}{a d^{2} e^{\left (d x + 2 \, c\right )} - i \, a d^{2} e^{c}}\right )} + \frac{1}{4} \, e^{2}{\left (\frac{4 \,{\left (d x + c\right )}}{a d} - \frac{2 i \, e^{\left (d x + c\right )}}{a d} - \frac{2 i \, e^{\left (-d x - c\right )}}{a d}\right )} + \frac{{\left (4 \, d^{3} x^{3} e^{c} -{\left (6 i \, d^{2} x^{2} e^{\left (2 \, c\right )} - 12 i \, d x e^{\left (2 \, c\right )} + 12 i \, e^{\left (2 \, c\right )}\right )} e^{\left (d x\right )} -{\left (6 i \, d^{2} x^{2} + 12 i \, d x + 12 i\right )} e^{\left (-d x\right )}\right )} f^{2} e^{\left (-c\right )}}{12 \, a d^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)^2*cosh(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="maxima")

[Out]

1/2*e*f*(4*x*e^(d*x + c)/(a*d*e^(d*x + c) - I*a*d) + (-2*I*d^2*x^2*e^c - 2*I*d*x*e^c - (2*I*d*x*e^(3*c) - 2*I*
e^(3*c))*e^(2*d*x) + 2*(d^2*x^2*e^(2*c) - 3*d*x*e^(2*c) + e^(2*c))*e^(d*x) - 2*(d*x + 1)*e^(-d*x) - 2*I*e^c)/(
a*d^2*e^(d*x + 2*c) - I*a*d^2*e^c)) + 1/4*e^2*(4*(d*x + c)/(a*d) - 2*I*e^(d*x + c)/(a*d) - 2*I*e^(-d*x - c)/(a
*d)) + 1/12*(4*d^3*x^3*e^c - (6*I*d^2*x^2*e^(2*c) - 12*I*d*x*e^(2*c) + 12*I*e^(2*c))*e^(d*x) - (6*I*d^2*x^2 +
12*I*d*x + 12*I)*e^(-d*x))*f^2*e^(-c)/(a*d^3)

________________________________________________________________________________________

Fricas [B]  time = 2.1649, size = 373, normalized size = 4.55 \begin{align*} \frac{{\left (-3 i \, d^{2} f^{2} x^{2} - 3 i \, d^{2} e^{2} - 6 i \, d e f - 6 i \, f^{2} +{\left (-6 i \, d^{2} e f - 6 i \, d f^{2}\right )} x +{\left (-3 i \, d^{2} f^{2} x^{2} - 3 i \, d^{2} e^{2} + 6 i \, d e f - 6 i \, f^{2} +{\left (-6 i \, d^{2} e f + 6 i \, d f^{2}\right )} x\right )} e^{\left (2 \, d x + 2 \, c\right )} + 2 \,{\left (d^{3} f^{2} x^{3} + 3 \, d^{3} e f x^{2} + 3 \, d^{3} e^{2} x\right )} e^{\left (d x + c\right )}\right )} e^{\left (-d x - c\right )}}{6 \, a d^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)^2*cosh(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="fricas")

[Out]

1/6*(-3*I*d^2*f^2*x^2 - 3*I*d^2*e^2 - 6*I*d*e*f - 6*I*f^2 + (-6*I*d^2*e*f - 6*I*d*f^2)*x + (-3*I*d^2*f^2*x^2 -
 3*I*d^2*e^2 + 6*I*d*e*f - 6*I*f^2 + (-6*I*d^2*e*f + 6*I*d*f^2)*x)*e^(2*d*x + 2*c) + 2*(d^3*f^2*x^3 + 3*d^3*e*
f*x^2 + 3*d^3*e^2*x)*e^(d*x + c))*e^(-d*x - c)/(a*d^3)

________________________________________________________________________________________

Sympy [A]  time = 1.94693, size = 376, normalized size = 4.59 \begin{align*} \begin{cases} \frac{\left (\left (- 2 i a^{5} d^{11} e^{2} e^{2 c} - 4 i a^{5} d^{11} e f x e^{2 c} - 2 i a^{5} d^{11} f^{2} x^{2} e^{2 c} - 4 i a^{5} d^{10} e f e^{2 c} - 4 i a^{5} d^{10} f^{2} x e^{2 c} - 4 i a^{5} d^{9} f^{2} e^{2 c}\right ) e^{- d x} + \left (- 2 i a^{5} d^{11} e^{2} e^{4 c} - 4 i a^{5} d^{11} e f x e^{4 c} - 2 i a^{5} d^{11} f^{2} x^{2} e^{4 c} + 4 i a^{5} d^{10} e f e^{4 c} + 4 i a^{5} d^{10} f^{2} x e^{4 c} - 4 i a^{5} d^{9} f^{2} e^{4 c}\right ) e^{d x}\right ) e^{- 3 c}}{4 a^{6} d^{12}} & \text{for}\: 4 a^{6} d^{12} e^{3 c} \neq 0 \\- \frac{x^{3} \left (i f^{2} e^{2 c} - i f^{2}\right ) e^{- c}}{6 a} - \frac{x^{2} \left (i e f e^{2 c} - i e f\right ) e^{- c}}{2 a} - \frac{x \left (i e^{2} e^{2 c} - i e^{2}\right ) e^{- c}}{2 a} & \text{otherwise} \end{cases} + \frac{e^{2} x}{a} + \frac{e f x^{2}}{a} + \frac{f^{2} x^{3}}{3 a} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)**2*cosh(d*x+c)**2/(a+I*a*sinh(d*x+c)),x)

[Out]

Piecewise((((-2*I*a**5*d**11*e**2*exp(2*c) - 4*I*a**5*d**11*e*f*x*exp(2*c) - 2*I*a**5*d**11*f**2*x**2*exp(2*c)
 - 4*I*a**5*d**10*e*f*exp(2*c) - 4*I*a**5*d**10*f**2*x*exp(2*c) - 4*I*a**5*d**9*f**2*exp(2*c))*exp(-d*x) + (-2
*I*a**5*d**11*e**2*exp(4*c) - 4*I*a**5*d**11*e*f*x*exp(4*c) - 2*I*a**5*d**11*f**2*x**2*exp(4*c) + 4*I*a**5*d**
10*e*f*exp(4*c) + 4*I*a**5*d**10*f**2*x*exp(4*c) - 4*I*a**5*d**9*f**2*exp(4*c))*exp(d*x))*exp(-3*c)/(4*a**6*d*
*12), Ne(4*a**6*d**12*exp(3*c), 0)), (-x**3*(I*f**2*exp(2*c) - I*f**2)*exp(-c)/(6*a) - x**2*(I*e*f*exp(2*c) -
I*e*f)*exp(-c)/(2*a) - x*(I*e**2*exp(2*c) - I*e**2)*exp(-c)/(2*a), True)) + e**2*x/a + e*f*x**2/a + f**2*x**3/
(3*a)

________________________________________________________________________________________

Giac [B]  time = 1.2607, size = 648, normalized size = 7.9 \begin{align*} \frac{2 \, d^{3} f^{2} x^{3} e^{\left (2 \, d x + 3 \, c\right )} - 2 i \, d^{3} f^{2} x^{3} e^{\left (d x + 2 \, c\right )} - 3 i \, d^{2} f^{2} x^{2} e^{\left (3 \, d x + 4 \, c\right )} + 6 \, d^{3} f x^{2} e^{\left (2 \, d x + 3 \, c + 1\right )} - 3 \, d^{2} f^{2} x^{2} e^{\left (2 \, d x + 3 \, c\right )} - 6 i \, d^{3} f x^{2} e^{\left (d x + 2 \, c + 1\right )} - 3 i \, d^{2} f^{2} x^{2} e^{\left (d x + 2 \, c\right )} - 3 \, d^{2} f^{2} x^{2} e^{c} - 6 i \, d^{2} f x e^{\left (3 \, d x + 4 \, c + 1\right )} + 6 i \, d f^{2} x e^{\left (3 \, d x + 4 \, c\right )} + 6 \, d^{3} x e^{\left (2 \, d x + 3 \, c + 2\right )} - 6 \, d^{2} f x e^{\left (2 \, d x + 3 \, c + 1\right )} + 6 \, d f^{2} x e^{\left (2 \, d x + 3 \, c\right )} - 6 i \, d^{3} x e^{\left (d x + 2 \, c + 2\right )} - 6 i \, d^{2} f x e^{\left (d x + 2 \, c + 1\right )} - 6 i \, d f^{2} x e^{\left (d x + 2 \, c\right )} - 6 \, d^{2} f x e^{\left (c + 1\right )} - 6 \, d f^{2} x e^{c} - 3 i \, d^{2} e^{\left (3 \, d x + 4 \, c + 2\right )} + 6 i \, d f e^{\left (3 \, d x + 4 \, c + 1\right )} - 6 i \, f^{2} e^{\left (3 \, d x + 4 \, c\right )} - 3 \, d^{2} e^{\left (2 \, d x + 3 \, c + 2\right )} + 6 \, d f e^{\left (2 \, d x + 3 \, c + 1\right )} - 6 \, f^{2} e^{\left (2 \, d x + 3 \, c\right )} - 3 i \, d^{2} e^{\left (d x + 2 \, c + 2\right )} - 6 i \, d f e^{\left (d x + 2 \, c + 1\right )} - 6 i \, f^{2} e^{\left (d x + 2 \, c\right )} - 3 \, d^{2} e^{\left (c + 2\right )} - 6 \, d f e^{\left (c + 1\right )} - 6 \, f^{2} e^{c}}{6 \,{\left (a d^{3} e^{\left (2 \, d x + 3 \, c\right )} - i \, a d^{3} e^{\left (d x + 2 \, c\right )}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x+e)^2*cosh(d*x+c)^2/(a+I*a*sinh(d*x+c)),x, algorithm="giac")

[Out]

1/6*(2*d^3*f^2*x^3*e^(2*d*x + 3*c) - 2*I*d^3*f^2*x^3*e^(d*x + 2*c) - 3*I*d^2*f^2*x^2*e^(3*d*x + 4*c) + 6*d^3*f
*x^2*e^(2*d*x + 3*c + 1) - 3*d^2*f^2*x^2*e^(2*d*x + 3*c) - 6*I*d^3*f*x^2*e^(d*x + 2*c + 1) - 3*I*d^2*f^2*x^2*e
^(d*x + 2*c) - 3*d^2*f^2*x^2*e^c - 6*I*d^2*f*x*e^(3*d*x + 4*c + 1) + 6*I*d*f^2*x*e^(3*d*x + 4*c) + 6*d^3*x*e^(
2*d*x + 3*c + 2) - 6*d^2*f*x*e^(2*d*x + 3*c + 1) + 6*d*f^2*x*e^(2*d*x + 3*c) - 6*I*d^3*x*e^(d*x + 2*c + 2) - 6
*I*d^2*f*x*e^(d*x + 2*c + 1) - 6*I*d*f^2*x*e^(d*x + 2*c) - 6*d^2*f*x*e^(c + 1) - 6*d*f^2*x*e^c - 3*I*d^2*e^(3*
d*x + 4*c + 2) + 6*I*d*f*e^(3*d*x + 4*c + 1) - 6*I*f^2*e^(3*d*x + 4*c) - 3*d^2*e^(2*d*x + 3*c + 2) + 6*d*f*e^(
2*d*x + 3*c + 1) - 6*f^2*e^(2*d*x + 3*c) - 3*I*d^2*e^(d*x + 2*c + 2) - 6*I*d*f*e^(d*x + 2*c + 1) - 6*I*f^2*e^(
d*x + 2*c) - 3*d^2*e^(c + 2) - 6*d*f*e^(c + 1) - 6*f^2*e^c)/(a*d^3*e^(2*d*x + 3*c) - I*a*d^3*e^(d*x + 2*c))